/**
 * 表格配置
 * 角色管理 menu-manage
 */
export default {
  'menu-manage': [
    {
      prop: 'menuName',
      name: '菜单名称',
      minWidth: 100
    },
    {
      prop: 'menuCode',
      name: '菜单编码',
      minWidth: 100
    },
    {
      prop: 'permission',
      name: '权限标识',
      minWidth: 100
    },
    {
      prop: 'url',
      name: 'URL',
      minWidth: 100
    },
    {
      prop: 'typeName',
      name: '类型',
      minWidth: 50
    },
    {
      prop: 'isBuryingPointName',
      name: '是否埋点',
      minWidth: 100,
      componentCell: 'CellSwitch',
      componentCellClass: 'on-off-yn-text',
      authId: 'grass-core:menu:buryingPoint',
      switchConfig: {
        valueTypeProp: 'code',
        dataProp: 'isBuryingPoint',
        activeCode: 1,
        activeName: '是',
        inactiveCode: 2,
        inactiveName: '否',
        switchPath: 'menuManage.buryingPoint',
        switchParamsProp: { id: 'id' }
      }
    },
    {
      prop: 'statusName',
      name: '状态',
      minWidth: 100,
      componentCell: 'CellSwitch',
      authId: 'grass-core:menu:enableOrDisable',
      switchConfig: {
        valueTypeProp: 'code',
        dataProp: 'status',
        activeCode: 1,
        activeName: '启用',
        inactiveCode: 2,
        inactiveName: '禁用',
        switchPath: 'menuManage.enableOrDisable',
        switchParamsProp: { id: 'id' }
      }
    },
    {
      prop: 'remark',
      name: '备注',
      minWidth: 100
    },
    {
      name: '操作',
      minWidth: 150,
      fixed: 'right',
      thStyle: { 'text-align': 'left' },
      operateList: [
        {
          type: 'btnText',
          label: '编辑',
          id: 'menu-manage-edit',
          authId: 'grass-core:menu:update',
          config: {
            type: 'text'
          },
          style: {
            color: 'rgb(219,139,57)'
          }
        },
        {
          type: 'btnText',
          label: '复制',
          id: 'menu-manage-add',
          authId: 'grass-core:menu:add',
          config: { type: 'text' },
          style: { color: 'rgb(219,139,57)' }
        },
        {
          type: 'btnText',
          label: '删除',
          id: 'menu-manage-delete',
          authId: 'grass-core:menu:deleteById',
          style: { color: '#f74a5c' },
          config: {
            color: 'rgb(219,139,57)',
            type: 'text'
          }
        },
      ]
    }
  ]
}
